<template>
  <!-- 动态绑定对象 -->
  <!-- <div id="app" :class="{pink: true,blue:true,green: false}"> -->
  <!-- 动态绑定数组 -->
  <div id="app" :class="classArr">
    <router-view />
  </div>
</template>

<script>
export default {
  name: 'App',
  computed: {
    classArr() {
      let className = ''
      // 获取settings中theme(你自己选择的)
      switch (this.$store.state.settings.theme) {
        case '#6959CD':
          className = 'purple-theme'
          break
        case '#F5222D':
          className = 'red-theme'
          break
        case '#212121':
          className = 'black-theme'
          break
        default:
          className = 'default-theme'
      }
      return [className]
    }
  }
}
</script>

<style lang="scss" scoped>

</style>
